CREATE TABLE jms_dim.dim_abnormal_event_report_base
(
    id                  bigint COMMENT '主键id',
    code                varchar(100) COMMENT '异常编号',
    involved_type_id    int COMMENT '涉事网点类型id',
    involved_type_desc  varchar(100) COMMENT '涉事网点类型desc',
    involved_org_id     int COMMENT '涉事组织id',
    involved_org_code   varchar(100) COMMENT '涉事组织编码',
    involved_org_name   varchar(100) COMMENT '涉事组织名称',
    involved_agent_id   int COMMENT '涉事组织代理区id',
    involved_agent_code varchar(100) COMMENT '涉事组织代理区编码',
    involved_agent_name varchar(100) COMMENT '涉事组织代理区名称',
    city_desc           varchar(100) COMMENT '所属城市',
    area_desc           varchar(100) COMMENT '所属区县',
    abnormal_type_id    bigint COMMENT '异常类型id',
    abnormal_type       varchar(100) COMMENT '异常类型',
    scene_name          varchar(100) COMMENT '场景名称',
    report_time         varchar(100) COMMENT '上报时间',
    happen_time         varchar(100) COMMENT '发生时间',
    end_time            varchar(100) COMMENT '结束时间',
    defer_day           smallint COMMENT '顺延天数',
    create_time         varchar(100) COMMENT '创建时间',
    update_time         varchar(100) COMMENT '修改时间'
) ENGINE=OLAP 
DUPLICATE KEY(id)
COMMENT "异常事件报表"
DISTRIBUTED BY HASH(code) BUCKETS 1 
PROPERTIES (
"replication_num" = "3",
"in_memory" = "false",
"storage_format" = "V2"
);